;; midi-mmc.scm - (c) rohan drape, 2003-2005

;; Basic constants and some comments on MMC.  Basic MMC support is not
;; difficult to provide using the standard receiver mechanism.

;; The set of MMC commands.

(define MMC-stop #x1)
(define MMC-play #x2)
(define MMC-deferred-play #x3)
(define MMC-fast-forward #x4)
(define MMC-rewind #x5)
(define MMC-record-strobe #x6)

(define MMC-record-exit #x7)
(define MMC-record-pause #x8)
(define MMC-pause #x9)
(define MMC-eject #xA)
(define MMC-chase #xB)
(define MMC-command-error-reset #xC)
(define MMC-reset #xD)

(define MMC-write #x40)
(define MMC-masked-write #x41)
(define MMC-read #x42)
(define MMC-update #x43)
(define MMC-locate #x44)
(define MMC-variable-play #x45)
(define MMC-search #x46)

(define MMC-shuttle #x47)
(define MMC-step #x48)
(define MMC-assign-system-master #x49)
(define MMC-generator-command #x4A)
(define MMC-mtc-command #x4B)
(define MMC-move #x4C)
(define MMC-add #x4D)

(define MMC-subtract #x4E)
(define MMC-drop-frame-adjust #x4F)
(define MMC-procedure #x50)
(define MMC-event #x51)
(define MMC-group #x52)
(define MMC-command-segment #x53)
(define MMC-deferred-variable-play #x54)

(define MMC-record-strobe-variable #x55)

(define MMC-wait #x7C)
(define MMC-resume #x7F)

;; The MMC-shuttle command provides two values: <real> the shuttle
;; speed, <boolean> forwards #t or reverse #f.

;; The MMC-masked-write has the message length in the first byte and
;; the message type in the second byte.  A masked write of type #x4f
;; is a 'Track Record Ready Status' message and provides REC-ENABLE
;; status for a set of tracks in the form: <integer> track number,
;; <boolean> record status.

;; The MMC-locate command provides one value: a byte array containing
;; the locate target value in MMC Standard Time Code format (5 bytes,
;; roughly: hrs/mins/secs/frames/subframes).
